package com.kindness.frate.widget;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

/**
 * Created by lenovo on 2017/7/1.
 */
public class MotionEventView extends View {
    public MotionEventView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.i("json", "onTouchEvent" + event.getAction());
        return super.onTouchEvent(event);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.i("json", "dispatchTouchEvent:" + event);
        return super.dispatchTouchEvent(event);
//        return false; // 只能从down开始然后return false后面的分发时间就没有继续分发了
    }
}
